#ifndef _DANIEL_KERR_GLWAIT_H
#define _DANIEL_KERR_GLWAIT_H

#include "driver.h"
#include "gltext.h"

void displayWait()
{
	vector <string> temp;
	temp.push_back("~Your Turn Is Now Over~");
	temp.push_back(" ~Please Switch Players~");

	glPushAttrib(GL_ENABLE_BIT);
		glDisable(GL_DEPTH_TEST);	
		glDisable(GL_LIGHTING);
		glDisable(GL_BLEND);	
	glMatrixMode(GL_PROJECTION);
	glPushMatrix();
		glLoadIdentity();
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
		glLoadIdentity();
		gluOrtho2D(0,X_DIM,Y_DIM,0);

		glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);

		glColor4f(0.5,0.5,0.5,1.0);	glRectf(130,250,670,350);
		glColor4f(0.1,0.1,0.1,1.0);	glRectf(135,255,665,345);
		glColor4f(1.0,1.0,1.0,0.4);	writeText(140,260,0.3,0.3,35,temp);
		SDL_GL_SwapBuffers();

	glMatrixMode(GL_MODELVIEW);
		glPopMatrix();
	glMatrixMode(GL_PROJECTION);
		glPopMatrix();
	glPopAttrib();
	
	SDL_Event event;
	while(true)
	{
		while(SDL_PollEvent(&event))
		{if(event.type==SDL_KEYDOWN){return;}}
	}
}

#endif